package com.yft.entity.purchasepos;

import com.yft.entity.base.BaseEntity;
import com.yft.entity.posinformation.PosModel;
import com.yft.enumeration.PosPattern;
import com.yft.enumeration.PosStatus;

import javax.persistence.*;
import java.util.Date;

/**
 * pos表
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = false, dynamicInsert = true)
@Table(name = "pos_purchase_detail")
public class PosPurchaseOrderDetail extends BaseEntity{

    private static final long serialVersionUID = -7780751496084708415L;
    /**
     * 主键
     */
    @Id
	@GeneratedValue
	@Column
	private Integer detailId;

    /**
     * pos业务类型
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false)
    private PosPurchaseOrderHeader posPurchaseOrderHeader;

    @Column(length = 50)
    private String headerId;

    /**
     * 终端序列号
     */
    @Column(length = 60)
    private String machineSnCode;

    /**
     * 终端号（第三方支付提供的编号）
     */
    @Column(length = 60)
    private String terminalSn;

    /**
     * 密码键盘号
     */
    @Column(length = 60)
    private String passwordKeySn;

    /**
     * pos机型
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false)
    private PosModel posModel;

    /**
     * pos机型主键
     */
    @Column(nullable = false)
    private Integer posModelId;

    /**
     * 机型(如 移动 拨号等）
     */
    @Enumerated(EnumType.STRING)
    @Column(length = 40,nullable = false)
    private PosPattern pattern;

    /**
     * 型号
     */
    @Column(length = 60,nullable = false)
    private String modelName;

    /**
     * 数量
     */
    @Column
    private Integer quality;

    /**
     * 通过名称模糊查询
     */
    @Transient
    private String se_modelName;

    /**
     * session中序号
     */
    @Transient
    private Integer index;

    public Integer getDetailId() {
        return detailId;
    }

    public void setDetailId(Integer detailId) {
        this.detailId = detailId;
    }

    public String getMachineSnCode() {
        return machineSnCode;
    }

    public void setMachineSnCode(String machineSnCode) {
        this.machineSnCode = machineSnCode;
    }

    public String getTerminalSn() {
        return terminalSn;
    }

    public void setTerminalSn(String terminalSn) {
        this.terminalSn = terminalSn;
    }

    public String getPasswordKeySn() {
        return passwordKeySn;
    }

    public void setPasswordKeySn(String passwordKeySn) {
        this.passwordKeySn = passwordKeySn;
    }

    public PosModel getPosModel() {
        return posModel;
    }

    public void setPosModel(PosModel posModel) {
        this.posModel = posModel;
    }

    public Integer getPosModelId() {
        return posModelId;
    }

    public void setPosModelId(Integer posModelId) {
        this.posModelId = posModelId;
    }

    public PosPattern getPattern() {
        return pattern;
    }

    public void setPattern(PosPattern pattern) {
        this.pattern = pattern;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public Integer getQuality() {
        return quality;
    }

    public void setQuality(Integer quality) {
        this.quality = quality;
    }

    public PosPurchaseOrderHeader getPosPurchaseOrderHeader() {
        return posPurchaseOrderHeader;
    }

    public void setPosPurchaseOrderHeader(PosPurchaseOrderHeader posPurchaseOrderHeader) {
        this.posPurchaseOrderHeader = posPurchaseOrderHeader;
    }

    public String getHeaderId() {
        return headerId;
    }

    public void setHeaderId(String headerId) {
        this.headerId = headerId;
    }

    public String getSe_modelName() {
        return se_modelName;
    }

    public void setSe_modelName(String se_modelName) {
        this.se_modelName = se_modelName;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }
}